﻿using System.Windows.Controls;
using System.Windows.Navigation;
using StartupSolution.ViewModel;

namespace StartupSolution.Views.Charts
{
    public partial class BasicGauges : Page
    {
        public BasicGauges()
        {
            InitializeComponent();
        }

        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            GaugeDataViewModel _gaugeDataViewModel = new GaugeDataViewModel();

            //Setting the DataContext of the gauges
            RadialGauge.DataContext = _gaugeDataViewModel;
            LinearGauge.DataContext = _gaugeDataViewModel;

            //Generating some data
            _gaugeDataViewModel.GenerateRandomValue();
        }

    }
}
